<template>
  <div class="full-box shadow-box padding-box">
    <OperateCollection
      :showAdd="false"
      @search="initData"
      @add="linkTo(`commonForm/${tableName}/0`)"
    >
      <template #condition>
        <div class="condition-item">
          <el-input
            v-model="queryParams.project_name"
            placeholder="按项目名称关键字查询"
            clearable
          ></el-input>
        </div>
      </template>
    </OperateCollection>
    <div class="table-wrapper">
      <BaseTable
        :columns="columns"
        :showSort="true"
        :tableData="tableData"
        :pages="{
          show: true,
          count: count,
        }"
        :operate="{
          show: true,
          width: 150,
        }"
        @pagination="pageChange"
      >
        <template #operate="{ current }">
          <el-button
            type="primary"
            size="mini"
            @click="linkTo(`commonForm/${tableName}/${current.row.id}`)"
            >详情</el-button
          >
        </template>
      </BaseTable>
    </div>
  </div>
</template>

<script>
import BaseTable from "@/components/Common/BaseTable.vue";
import OperateCollection from "./components/OperateCollection.vue";
import LinkTo from "@/mixins/LinkTo";
import commonList from "@/mixins/commonList";
export default {
  mixins: [LinkTo, commonList],
  components: { BaseTable, OperateCollection },
  data() {
    return {
      columns: columns,
      tableData: [],
      count: 0,
      queryParams: {
        pageNum: 1,
        pageSize: 20,
        check_status: "",
        project_name: "",
      },
      tableName: "t_agency_service_instance",
    };
  },
};

const columns = [
  {
    prop: "",
    label: "项目名称",
    width: "",
    minWidth: "200",
    align: "",
  },
  {
    prop: "",
    label: "服务事项",
    width: "",
    minWidth: "100",
    align: "",
  },
  {
    prop: "",
    label: "服务价格",
    width: "",
    minWidth: "100",
    align: "",
  },
  {
    prop: "",
    label: "约定完成日期",
    width: "",
    minWidth: "100",
    align: "",
  },
  {
    prop: "",
    label: "实际完成日期",
    width: "",
    minWidth: "100",
    align: "",
  },
  {
    prop: "",
    label: "服务结果评价等级",
    width: "",
    minWidth: "100",
    align: "",
  },
];
</script>

<style lang="scss" scoped="">
</style>